home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 033a / rfmsmall.zip / RFM-SUB4.MRG < prev    next >
Text File  |  1990-09-01  |  6KB  |  112 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. *
  3. * This merge modifies the Fast File Search (FFS) lookup
  4. * by adding a 3 character date to each FIDX file entry.
  5. * Every time a user V)iews, D)ownloads, or attempts to
  6. * U)pload a file listed in the FIDX, the current date will
  7. * be inserted in this 3 character field.  In that way,
  8. * RBBS will track the date when a file was most recently
  9. * used.  Changes are flagged as WM050501.
  10. *
  11. *                            Warren Muldrow
  12. *                            The Software Designer
  13. *                            8:928/1 or 1:3617/1
  14. *                            (912)-432-2440
  15. *
  16. * Merge this against 173Asub4.bas to produce rbbssub4.bas
  17. * 173Asub4.bas:  Date 8-26-1990  Size 126891 bytes
  18. *
  19. * ------------[ Created 09-01-1990 08:17:11 ]------------
  20. * REPLACING old line(s) by new
  21. 58700 ' $SUBTITLE: 'RotorsDir - search thru a list of subdirs for a file'
  22. ' $PAGE
  23. '
  24. '  NAME    -- RotorsDir
  25. '
  26. '  INPUTS  --     PARAMETER                    MEANING
  27. '             FilName$                  FILE NAME TO LOOK FOR
  28. '             SDIR.ARA                  ARRAY OF SUBDIRECTORIES
  29. '             MaxSearch                 MAX # OF SUBDIRECTORIES
  30. '             MarkingTime               WHETHER TO MARK TIME
  31. '
  32. '  OUTPUTS -- FNAME$                    ADD SUBDIRECTORY TO THE
  33. '                                       FILE NAME IF FOUND.  OTHER-
  34. '                                       WISE DON'T.
  35. '             ZOK                       TRUE IF FILE WAS Found
  36. '
  37. '  PURPOSE -- Hunt through a list of subdirectories to determine
  38. '             if a file is in any of them.  If file is found, open
  39. '             the file as file #2, add the drive/path to the file
  40. '             name, and sets ZOK to true.  If file isn't found, set
  41. '             file name to the last subdirectory searched -- which
  42. '             should be the upload subdirectory.
  43. '
  44. '             If the library menu is selected (ZMenuIndex = 6), then
  45. '             only 2 subdirectories are searched. The first being
  46. '             the work disk and the second being the selected
  47. '             library disk.
  48. '
  49.       SUB RotorsDir (FilName$,SDirAra$(1),MaxSearch,MarkingTime,PassToMacro$) STATIC ' KG022204
  50.       ZOK = ZFalse
  51.       ZDotFlag = ZFalse
  52.       IF MarkingTime THEN _
  53.          CALL QuickTPut ("Searching for "+FilName$,0)
  54.       IF ZMenuIndex = 6 THEN _
  55.          GOTO 58705
  56.       NumSearch = 1
  57.       WasX = 0
  58.       WHILE (NOT ZOK) AND NumSearch <= MaxSearch AND _
  59.          SDirAra$(NumSearch) <> ""
  60.          IF MarkingTime THEN _
  61.             CALL MarkTime (WasX)
  62.          WasX$ = SDirAra$(NumSearch) + _
  63.               FilName$
  64.          CALL FindFile (WasX$,ZOK)
  65.          NumSearch = NumSearch + 1
  66.       WEND
  67.       IF ZOK OR NOT ZFastFileSearch THEN _                           ' KG022301
  68.          GOTO 58710                                                  ' KG022301
  69. * ------[ first line different ]------
  70.       CALL OpenRSeq (ZFastFileList$,HighRec,WasX,21)                 ' WM050501
  71.       FIELD #2, 12 AS SearchFile$, _                                 ' WM050501
  72.                  4 AS SearchPath$, _                                 ' WM050501
  73.                  3 AS SearchDate$, _                                 ' WM050501
  74.                  2 AS SearchCrLf$                                    ' WM050501
  75.       IF ZErrCode <> 0 THEN _                                        ' KG022301
  76.          GOTO 58710                                                  ' KG022301
  77.       CALL TrimTrail (FilName$,".")
  78.       CALL BinSearch (FilName$,1,12,21,HighRec,RecFoundAt,RecFound$) ' WM050501
  79.       ZOK = (RecFoundAt > 0)
  80.       IF NOT ZOK THEN _                                              ' KG022301
  81.          GOTO 58710                                                  ' KG022301
  82.       ZOK = ZFalse
  83.       CALL CheckInt (MID$(RecFound$,13,4))
  84.       IF ZTestedIntValue < 1 THEN _                                  ' KG022301
  85.          GOTO 58710                                                  ' KG022301
  86.       WasX$ = DATE$                                                  ' WM050501
  87.       LSET SearchDate$ = CHR$ (VAL (MID$ (WasX$, 9, 2)) - 48) + _    ' WM050501
  88.                          CHR$ (VAL (MID$ (WasX$, 1, 2)) + 31) + _    ' WM050501
  89.                          CHR$ (VAL (MID$ (WasX$, 4, 2)) + 31)        ' WM050501
  90.       PUT 2, RecFoundAt                                              ' WM050501
  91.       CALL OpenRSeq (ZFastFileLocator$,HighRec,WasX,66)
  92.       IF ZErrCode <> 0 OR ZTestedIntValue > HighRec THEN _           ' KG022301
  93.          GOTO 58710                                                  ' KG022301
  94.       FIELD 2, 66 AS LocatorRec$
  95.       GET 2, ZTestedIntValue
  96.       WasX$ = LEFT$(LocatorRec$,63)
  97.       CALL Trim (WasX$)
  98.       IF LEFT$(WasX$,2) = "M!" THEN _
  99.          ZOK = ZFalse : _                                            ' KG022301
  100.          ZGSRAra$(1) = PassToMacro$ : _                              ' KG022204
  101.          WasX$ = RIGHT$(WasX$,LEN(WasX$)-2) : _                      ' KG022204
  102.          CALL Trim (WasX$) : _                                       ' KG022204
  103.          ZFileLocation$ = "" : _                                     ' KG022301
  104.          CALL MacroExe (WasX$) : _                                   ' KG022204
  105.          IF ZFileLocation$ = "" THEN _                               ' KG022301
  106.             ZOK = ZFalse : _                                         ' KG022204
  107.             GOTO 58711 _                                             ' KG022301
  108.          ELSE WasX$ = ZFileLocation$                                 ' KG022301
  109.       WasX$ = WasX$ + FilName$                                       ' KG022301
  110.       CALL FindFile (WasX$,ZOK)                                      ' KG022301
  111.       GOTO 58710                                                     ' KG022301
  112.